export const EdgeType = ['edge', 'polyline', 'bezier', 'line'];
export const ButtonList = [
  {
    label: '同意',
    key: 'agreement',
    visible: true,
    alias: '',
    desc: '用于保存用户编辑的数据，并根据流程规则触发后续节点',
    configDisabled: false,
    extension: null,
  },
  {
    label: '不同意',
    key: 'disagree',
    visible: true,
    alias: '',
    desc: '用于保存用户编辑的数据，并根据流程规则触发后续节点',
    configDisabled: false,
    extension: null,
  },
  {
    label: '暂存',
    key: 'hold',
    visible: true,
    alias: '',
    desc: '用于保存用户编辑的数据但停留在当前流程',
    configDisabled: false,
    extension: null,
  },
  {
    label: '提交',
    key: 'submit',
    visible: true,
    alias: '',
    desc: '用于保存用户编辑的数据，并根据流程规则触发后续节点',
    configDisabled: true,
    extension: null,
  },
  {
    label: '转交',
    key: 'forward',
    visible: true,
    alias: '',
    desc: '用于保存用户编辑的数据，并转交流程给指定人员',
    configDisabled: false,
    extension: null,
  },
  {
    label: '加签',
    key: 'countersign',
    visible: false,
    alias: '',
    desc: '用于节点审批人临时增加新的审批人',
    configDisabled: false,
    extension: null,
  },
  {
    label: '退回',
    key: 'fallback',
    visible: false,
    alias: '',
    desc: '用于将流程退回到某个前面某个节点',
    configDisabled: false,
    extension: null,
  },
];
export const InitFlowNodesData = [
  {
    x: 620,
    y: 80,
    id: '32fd8d0c-eb59-49c6-aebe-378ce8b44810',
    text: {
      x: 620,
      y: 80,
      value: '开始',
    },
    type: 'start',
    properties: {
      nodeId: {
        key: 'nodeId',
        pos: 20000,
        name: '节点编码',
        value: null,
        uiType: 'InputControl',
        disabled: true,
        defaultValue: '32fd8d0c-eb59-49c6-aebe-378ce8b44810',
      },
      nodeName: {
        key: 'nodeName',
        pos: 20010,
        name: '节点名称',
        value: null,
        uiType: 'InputControl',
        defaultValue: '开始',
      },
    },
  },
  {
    x: 620,
    y: 220,
    id: '7e4e8ca3-3453-434a-b041-d94b56049850',
    text: {
      x: 620,
      y: 220,
      value: '经办节点',
    },
    type: 'transactor',
    properties: {
      nodeId: {
        key: 'nodeId',
        pos: 20000,
        name: '节点编码',
        value: null,
        uiType: 'InputControl',
        disabled: true,
        defaultValue: '7e4e8ca3-3453-434a-b041-d94b56049850',
      },
      nodeName: {
        key: 'nodeName',
        pos: 20010,
        name: '节点名称',
        value: null,
        uiType: 'InputControl',
        defaultValue: '经办节点',
      },
      actionBtn: {
        key: 'actionBtn',
        pos: 20040,
        name: '功能按钮',
        value: null,
        uiType: 'ActionBtnControl',
        defaultValue: [
          {
            key: 'hold',
            desc: '用于保存用户编辑的数据但停留在当前流程',
            alias: '',
            label: '暂存',
            visible: true,
            extension: null,
            configDisabled: false,
          },
          {
            key: 'submit',
            desc: '用于保存用户编辑的数据，并根据流程规则触发后续节点',
            alias: '',
            label: '提交',
            visible: true,
            extension: null,
            configDisabled: true,
          },
          {
            key: 'forward',
            desc: '用于保存用户编辑的数据，并转交流程给指定人员',
            alias: '',
            label: '转交',
            visible: true,
            extension: null,
            configDisabled: false,
          },
          {
            key: 'fallback',
            desc: '用于将流程退回到某个前面某个节点',
            alias: '',
            label: '退回',
            visible: false,
            extension: null,
            configDisabled: false,
          },
        ],
      },
      actionAuth: {
        key: 'actionAuth',
        pos: 20030,
        name: '操作权限 ',
        value: null,
        prompt:
          '所有字段均未设置可写时，之前节点已参与过经办的人员在此节点会自动跳过，不再参与',
        uiType: 'ActionAuthControl',
        defaultValue: [],
      },
      actionOrder: {
        key: 'actionOrder',
        pos: 20050,
        name: '节点处理人为多人时，业务处理顺序',
        value: null,
        uiType: 'SelectControl',
        propData: {
          options: [
            {
              label: '所有处理人同时处理',
              value: 'same',
            },
            {
              label: '按处理人设置顺序依次处理',
              value: 'order',
            },
          ],
        },
        defaultValue: 'same',
      },
      handlerTime: {
        key: 'handlerTime',
        pos: 20090,
        name: '审批限时',
        value: null,
        prompt: '可限定经办人处理时间及超时处理方式',
        uiType: 'HandlerTimeControl',
        propData: {
          options: [
            {
              label: '不限时',
              value: 'all',
            },
            {
              label: '自定义通知时间',
              value: 'custom',
            },
          ],
          commitTypeOptions: [
            {
              label: '超时自动提交',
              value: 'autoCommit',
            },
            {
              label: '超时自动提醒',
              value: 'autoNotice',
            },
            {
              label: '超时自动驳回到上一节点',
              value: 'autoPrev',
            },
            {
              label: '超时自动驳回到发起节点',
              value: 'autoStart',
            },
          ],
        },
        defaultValue: {
          data: 8,
          type: 'all',
          commitType: 'autoCommit',
        },
      },
      handlerEmpty: {
        key: 'handlerEmpty',
        pos: 20070,
        name: '找不到处理人时',
        value: null,
        uiType: 'SelectControl',
        propData: {
          options: [
            {
              label: '交给管理员经办',
              value: 'admin',
            },
            {
              label: '自动进入下一节点',
              value: 'autoNext',
            },
          ],
        },
        defaultValue: 'admin',
      },
      actionHandler: {
        key: 'actionHandler',
        pos: 20020,
        name: '经办人',
        value: null,
        uiType: 'ActionHandlerControl',
        defaultValue: [],
      },
      messageNotice: {
        key: 'messageNotice',
        pos: 20080,
        name: '节点消息通知',
        value: null,
        prompt: '可定义流程流转到节点时，经办人接收到的消息内容',
        uiType: 'MessageNoticeControl',
        propData: {
          options: [
            {
              label: '使用系统默认通知',
              value: 'system',
            },
            {
              label: '自定义通知',
              value: 'custom',
              disabled: true,
            },
          ],
        },
        defaultValue: {
          type: 'system',
          isImmediate: true,
        },
      },
    },
  },
  {
    x: 620,
    y: 360,
    id: '1a74151a-7696-48c9-b466-bd1c687a1af8',
    text: {
      x: 620,
      y: 360,
      value: '审批节点',
    },
    type: 'approve',
    properties: {
      nodeId: {
        key: 'nodeId',
        pos: 20000,
        name: '节点编码',
        value: null,
        uiType: 'InputControl',
        disabled: true,
        defaultValue: '1a74151a-7696-48c9-b466-bd1c687a1af8',
      },
      nodeName: {
        key: 'nodeName',
        pos: 20010,
        name: '节点名称',
        value: null,
        uiType: 'InputControl',
        defaultValue: '审批节点',
      },
      actionBtn: {
        key: 'actionBtn',
        pos: 20040,
        name: '功能按钮',
        value: null,
        uiType: 'ActionBtnControl',
        defaultValue: [
          {
            key: 'agreement',
            desc: '用于保存用户编辑的数据，并根据流程规则触发后续节点',
            alias: '',
            label: '同意',
            visible: true,
            extension: null,
            configDisabled: false,
          },
          {
            key: 'disagree',
            desc: '用于保存用户编辑的数据，并根据流程规则触发后续节点',
            alias: '',
            label: '不同意',
            visible: true,
            extension: null,
            configDisabled: false,
          },
          {
            key: 'hold',
            desc: '用于保存用户编辑的数据但停留在当前流程',
            alias: '',
            label: '暂存',
            visible: true,
            extension: null,
            configDisabled: false,
          },
          {
            key: 'forward',
            desc: '用于保存用户编辑的数据，并转交流程给指定人员',
            alias: '',
            label: '转交',
            visible: true,
            extension: null,
            configDisabled: false,
          },
          {
            key: 'countersign',
            desc: '用于节点审批人临时增加新的审批人',
            alias: '',
            label: '加签',
            visible: false,
            extension: null,
            configDisabled: false,
          },
          {
            key: 'fallback',
            desc: '用于将流程退回到某个前面某个节点',
            alias: '',
            label: '退回',
            visible: false,
            extension: null,
            configDisabled: false,
          },
        ],
      },
      actionAuth: {
        key: 'actionAuth',
        pos: 20030,
        name: '操作权限 ',
        value: null,
        prompt:
          '所有字段均未设置可写时，之前节点已参与过经办的人员在此节点会自动跳过，不再参与',
        uiType: 'ActionAuthControl',
        defaultValue: [],
      },
      actionOrder: {
        key: 'actionOrder',
        pos: 20050,
        name: '节点处理人为多人时，业务处理顺序',
        value: null,
        uiType: 'SelectControl',
        propData: {
          options: [
            {
              label: '所有处理人同时处理',
              value: 'same',
            },
            {
              label: '按处理人设置顺序依次处理',
              value: 'order',
            },
          ],
        },
        defaultValue: 'same',
      },
      handlerTime: {
        key: 'handlerTime',
        pos: 20090,
        name: '审批限时',
        value: null,
        prompt: '可限定经办人处理时间及超时处理方式',
        uiType: 'HandlerTimeControl',
        propData: {
          options: [
            {
              label: '不限时',
              value: 'all',
            },
            {
              label: '自定义通知时间',
              value: 'custom',
            },
          ],
          commitTypeOptions: [
            {
              label: '超时自动提交',
              value: 'autoCommit',
            },
            {
              label: '超时自动提醒',
              value: 'autoNotice',
            },
            {
              label: '超时自动驳回到上一节点',
              value: 'autoPrev',
            },
            {
              label: '超时自动驳回到发起节点',
              value: 'autoStart',
            },
          ],
        },
        defaultValue: {
          data: 8,
          type: 'all',
          commitType: 'autoCommit',
        },
      },
      handlerEmpty: {
        key: 'handlerEmpty',
        pos: 20070,
        name: '找不到处理人时',
        value: null,
        uiType: 'SelectControl',
        propData: {
          options: [
            {
              label: '交给管理员经办',
              value: 'admin',
            },
            {
              label: '自动进入下一节点',
              value: 'autoNext',
            },
          ],
        },
        defaultValue: 'admin',
      },
      actionHandler: {
        key: 'actionHandler',
        pos: 20020,
        name: '审批人',
        value: null,
        uiType: 'ActionHandlerControl',
        defaultValue: [],
      },
      messageNotice: {
        key: 'messageNotice',
        pos: 20080,
        name: '节点消息通知',
        value: null,
        prompt: '可定义流程流转到节点时，经办人接收到的消息内容',
        uiType: 'MessageNoticeControl',
        propData: {
          options: [
            {
              label: '使用系统默认通知',
              value: 'system',
            },
            {
              label: '自定义通知',
              value: 'custom',
              disabled: true,
            },
          ],
        },
        defaultValue: {
          type: 'system',
          isImmediate: true,
        },
      },
    },
  },
  {
    x: 620,
    y: 500,
    id: '1348e2f0-5334-4ca3-a67e-5ca08acf16e9',
    text: {
      x: 620,
      y: 500,
      value: '结束',
    },
    type: 'end',
    properties: {
      nodeId: {
        key: 'nodeId',
        pos: 20000,
        name: '节点编码',
        value: null,
        uiType: 'InputControl',
        disabled: true,
        defaultValue: '1348e2f0-5334-4ca3-a67e-5ca08acf16e9',
      },
      nodeName: {
        key: 'nodeName',
        pos: 20010,
        name: '节点名称',
        value: null,
        uiType: 'InputControl',
        defaultValue: '结束',
      },
      messageNotice: {
        key: 'messageNotice',
        pos: 20080,
        name: '节点消息通知',
        value: null,
        prompt: '可定义流程流转到节点时，经办人接收到的消息内容',
        uiType: 'MessageNoticeControl',
        propData: {
          options: [
            {
              label: '使用系统默认通知',
              value: 'system',
            },
            {
              label: '自定义通知',
              value: 'custom',
              disabled: true,
            },
          ],
        },
        defaultValue: {
          type: 'system',
          isImmediate: true,
        },
      },
    },
  },
];
export const InitFlowEdgesData = [
  {
    id: '31a44cc8-1151-4d0b-82ba-60ac5083077c',
    type: 'polyline',
    sourceNodeId: '32fd8d0c-eb59-49c6-aebe-378ce8b44810',
    targetNodeId: '7e4e8ca3-3453-434a-b041-d94b56049850',
    startPoint: {
      x: 620,
      y: 130,
    },
    endPoint: {
      x: 620,
      y: 180,
    },
    properties: {},
    pointsList: [
      {
        x: 620,
        y: 130,
      },
      {
        x: 620,
        y: 160,
      },
      {
        x: 620,
        y: 160,
      },
      {
        x: 620,
        y: 150,
      },
      {
        x: 620,
        y: 150,
      },
      {
        x: 620,
        y: 180,
      },
    ],
  },
  {
    id: '741f549c-e877-4219-b8d2-b295d900ec6a',
    type: 'polyline',
    sourceNodeId: '7e4e8ca3-3453-434a-b041-d94b56049850',
    targetNodeId: '1a74151a-7696-48c9-b466-bd1c687a1af8',
    startPoint: {
      x: 620,
      y: 260,
    },
    endPoint: {
      x: 620,
      y: 320,
    },
    properties: {},
    pointsList: [
      {
        x: 620,
        y: 260,
      },
      {
        x: 620,
        y: 320,
      },
    ],
  },
  {
    id: 'cf62b1f1-26f1-4d70-a595-c2e4f5d27803',
    type: 'polyline',
    sourceNodeId: '1a74151a-7696-48c9-b466-bd1c687a1af8',
    targetNodeId: '1348e2f0-5334-4ca3-a67e-5ca08acf16e9',
    startPoint: {
      x: 620,
      y: 400,
    },
    endPoint: {
      x: 620,
      y: 450,
    },
    properties: {},
    pointsList: [
      {
        x: 620,
        y: 400,
      },
      {
        x: 620,
        y: 430,
      },
      {
        x: 620,
        y: 430,
      },
      {
        x: 620,
        y: 420,
      },
      {
        x: 620,
        y: 420,
      },
      {
        x: 620,
        y: 450,
      },
    ],
  },
];
